home *** CD-ROM | disk | FTP | other *** search
- (*----------------------------------------------------------------------*)
- (* Readln_F: Read a line from the file F *)
- (*----------------------------------------------------------------------*)
-
- PROCEDURE Readln_F;
-
- (*----------------------------------------------------------------------*)
- (* *)
- (* Procedure: Readln_F *)
- (* *)
- (* Purpose: Read a line from the file F *)
- (* *)
- (* Calling sequence: *)
- (* *)
- (* Readln_F; *)
- (* *)
- (* Calls: RMAX *)
- (* *)
- (* Remarks: *)
- (* *)
- (* EOF( F ) MUST be FALSE on entry, but may be TRUE on exit. *)
- (* Cur_Line, Cur_Page, Max_Line, and Max_Page are updated. *)
- (* *)
- (* Note: The input buffer for file F is used to "peek" at *)
- (* the next character. This corresponds to looking at *)
- (* F^ in standard Pascal. *)
- (* *)
- (*----------------------------------------------------------------------*)
-
- VAR
- Buf_Ptr: Buffer_Ptr;
-
- BEGIN (* Readln_F *)
- (* Reset F to beginning of next *)
- (* line. *)
- IF ( NOT Strip_High ) THEN Readln( F );
- (* Update current line *)
- Cur_line := Cur_line + 1;
- Max_line := RMAX( Cur_line , Max_line );
-
- (* See if next char will be page *)
- (* marker. If so, update page *)
- (* count now. *)
-
- Buf_Ptr := PTR( SEG( F_Ptr^ ) , F_Ptr^.BufPtr );
-
- IF Buf_Ptr^[0] = Eject_Char THEN
- BEGIN
- Cur_page := Cur_page + 1;
- Max_page := RMAX( Cur_page , Max_page );
- END;
-
- END (* Readln_F *);